<?php $table = $this->adapter->getConfig()->table; ?>

SELECT
	(SHA1(CONCAT('<?php echo $this->password; ?>', self.salt)) = self.password) as passwordValid

FROM
	<?php echo $table; ?> AS self

WHERE
	self.id = <?php echo $this->id; ?>